-
Notifications
You must be signed in to change notification settings - Fork 889
Add support for complex matching to file-name-casing-rule #4284
Add support for complex matching to file-name-casing-rule #4284
Conversation
Thanks for your interest in palantir/tslint, @yordis! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
Linter is failing related to an issue I encounter, to be honest, I tried to fix it but it seems that TypeScript is the issue. I need help on that one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The strict-boolean-expressions
error seems spooky and mysterious at first glance... once my comments are addressed, if it's still there, I can take a longer look. Odd.
Thanks for sending this in!
@JoshuaKGoldberg finished the reviews except one that I need your response about it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost ready 😁
Oh dear, I just realized there's already PR for this. Sorry @yordis, I didn't realize the linked #4220 is a duplicate of #4071. Funny how two PRs for about the same feature look so different. I don't want to close this PR, in case the other doesn't goes in, but let's hold off on merging this in out of respect for @cheeZery having already sent one in. |
@JoshuaKGoldberg do you know how long it would take to get this feature released? |
Unfortunately no. The Palantir folks are looking into getting some to maintain TSLint full time and I don't have those rights. |
fixes #4220. Fixes #4071
PR checklist
Overview of change:
Following #4220 we could pass a key-value pair where the key represents a regex that will be used
for matching against the names.
A little caveat, the regex is always a termination regex.
For example:
.component.tsx
is actually.component.tsx$
(notice the$
).Allowing arbitrary Regex is a rabbit hole, at least this way we ware safe to remove the last part of the Regex from the string and be able to check the remaining name, since we do not want to check validate the regex section of the name.
Is there anything you'd like reviewers to focus on?
I am missing the correct
options
configuration, I am not sure what is the correct config.CHANGELOG.md entry: